<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="${ctx}/css/style.css" type="text/css" rel="stylesheet" />
<script src="${ctx}/js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="${ctx}/js/util.js" type="text/javascript"></script>
<script src="${ctx}/js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="${ctx}/js/jquery.cookie.js" type="text/javascript"></script>
<script src="${ctx}/js/jquery.treeview.js" type="text/javascript"></script>
<script src="${ctx}/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="${ctx}/js/validate.addmethod.js" type="text/javascript"></script>
<script src="${ctx}/js/messages_cn.js" type="text/javascript"></script>
<title>密码修改</title>
</head>
<body>
<div class="m_right">

    <div class="m_r_tips">
       <div class="m_r_lefttips">您现在的位置：<a href="${ctx}/admin/home.jsp">首页</a>&gt;我的信息&gt;密码修改</div>
       <jsp:include page="/commons/admin/admin_login_remind.jsp"/>
    </div>

    <s:if test="#session.DO_FEEDBACK != null" >
           <div class="m_r_tips">
               <div class="m_r_lefttips"><span style="color:red">
                  ${DO_FEEDBACK}
                  <% session.removeAttribute("DO_FEEDBACK"); %>
               </span></div>
          </div>
    </s:if>
    

    <s:form id="account_form" method="post" action="changePwd" namespace="/admin/account">
     <div class="m_r_search">
       <div class="m_r_search_con">
         <table width="700" border="0" cellspacing="0" cellpadding="0" align="center"  style="border-collapse: collapse;border-spacing: 0; border:0;margin:0px auto; ">
         
              <tr>
                <td width="90" class="m_r_s_con_td"><span class="required_mark">*</span>原密码</td>
                <td width="275" class="m_r_s_con_text">&nbsp;
                    <input type="password" id="password" name="acc.password" class="text_input required" maxlength="32"/>                    
                </td>
                <td width="130"  class="m_r_s_con_text"></td>
              </tr> 
              <tr>
                <td width="90" class="m_r_s_con_td"><span class="required_mark">*</span>新密码</td>
                <td width="275" class="m_r_s_con_text">&nbsp;
                    <input type="password" id="new_pwd" name="new_pwd" minlength="6" class="text_input required" maxlength="32"/>      
                </td>
                <td width="130"  class="m_r_s_con_text"></td>
              </tr> 
              <tr>
                <td width="90" class="m_r_s_con_td"><span class="required_mark">*</span>密码确认</td>
                <td width="275" class="m_r_s_con_text">&nbsp;
                    <input type="password" id="confirm_pwd" name="confirm_pwd"  equalTo="#new_pwd" class="required text_input" maxlength="32"/>
                </td>
                <td width="130"  class="m_r_s_con_text"></td>
              </tr> 
              <tr>
                <td width="90" class="m_r_s_con_td"></td>
                <td width="275" class="m_r_s_con_text">
                        <s:actionerror cssStyle="color:red"/>
                </td>
                <td width="130"  class="m_r_s_con_text"></td>
              </tr> 
         </table>
       </div>
    </div>
    
    <div class="m_r_search_btn">
      <a href="#" class="m_r_bnt1 pad15"><s:submit value="修改密码" /></a>
    </div>
    </s:form>
    
    
  </div>
</body>
<script type="text/javascript">

	$.validator.setDefaults({
	    submitHandler: function(form) { 
	    	var password = $("#password")[0];
	        var new_pwd = $("#new_pwd")[0];
	        password.value = hex_md5(password.value);
	        new_pwd.value = hex_md5(new_pwd.value); 
	        form.submit(); //不能用$("#id").submit() 会导致死循环
	    }
	});

	$("#account_form").validate();

</script>
</html>